From: Marco Trevisan (TreviƱo) Date: Tue, 7 Oct 2025 18:08:39 +0000 (+0200) Subject: notificationDaemon: Do not send activation event multiple times X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~80^2^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1a7802cf0b6380aea188ce24c0624abe3ad3405e;p=gnome-shell.git notificationDaemon: Do not send activation event multiple times When a FDO notification is updated we reuse the previous instance, however we do not care about disconnecting the default activation signal and thus we may end up emitting the same multiple times, even in the case the updated notification has no action at all. So track the signal connections. Part-of: --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 3d9edaceb..de99e158d 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -193,6 +193,7 @@ class FdoNotificationDaemon { break; } this._emitNotificationClosed(id, notificationClosedReason); + notification.disconnectObject(this); }); } @@ -210,6 +211,7 @@ class FdoNotificationDaemon { acknowledged: false, }); notification.clearActions(); + notification.disconnectObject(this); let hasDefaultAction = false; @@ -228,14 +230,14 @@ class FdoNotificationDaemon { } if (hasDefaultAction) { - notification.connect('activated', () => { + notification.connectObject('activated', () => { this._emitActivationToken(source, id); this._emitActionInvoked(id, 'default'); - }); + }, this); } else { - notification.connect('activated', () => { + notification.connectObject('activated', () => { source.open(); - }); + }, this); } switch (hints.urgency) {